home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gsparam.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  20.5 KB  |  546 lines

  1. /* Copyright (C) 1993, 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gsparam.h,v 1.7 2000/09/19 19:00:30 lpd Exp $ */
  20. /* Client interface to parameter dictionaries */
  21.  
  22. #ifndef gsparam_INCLUDED
  23. #  define gsparam_INCLUDED
  24.  
  25. #include "gsstype.h"
  26.  
  27. /*
  28.  * Several interfaces use parameter dictionaries to communicate sets of
  29.  * (key, value) pairs between a client and an object with complex state.
  30.  * (Several of these correspond directly to similar interfaces in the
  31.  * PostScript language.) This file defines the API for parameter dictionaries.
  32.  */
  33.  
  34. /* ---------------- Generic interfaces ---------------- */
  35.  
  36. /* Define the abstract type for a parameter list. */
  37. #ifndef gs_param_list_DEFINED
  38. #  define gs_param_list_DEFINED
  39. typedef struct gs_param_list_s gs_param_list;
  40. #endif
  41.  
  42. /* Define the type for a parameter key name. */
  43. typedef const char *gs_param_name;
  44.  
  45. /*
  46.  * Parameter values fall into three categories:
  47.  *      - Scalar (null, Boolean, int, long, float);
  48.  *      - Homogenous collection (string/name, int array, float array,
  49.  *      string/name array);
  50.  *      - Heterogenous collection (dictionary, int-keyed dictionary, array).
  51.  * Each category has its own representation and memory management issues.
  52.  */
  53. typedef enum {
  54.     /* Scalar */
  55.     gs_param_type_null, gs_param_type_bool, gs_param_type_int,
  56.     gs_param_type_long, gs_param_type_float,
  57.     /* Homogenous collection */
  58.     gs_param_type_string, gs_param_type_name,
  59.     gs_param_type_int_array, gs_param_type_float_array,
  60.     gs_param_type_string_array, gs_param_type_name_array,
  61.     /* Heterogenous collection */
  62.     gs_param_type_dict, gs_param_type_dict_int_keys, gs_param_type_array
  63. } gs_param_type;
  64.  
  65. /* Define a "don't care" type for reading typed values. */
  66. #define gs_param_type_any ((gs_param_type)-1)
  67.  
  68. /*
  69.  * Define the structures for homogenous collection values
  70.  * (string/name, integer array, or floating point array).
  71.  * The size is the number of elements, not the size in bytes.
  72.  * A value is persistent if it is defined as static const,
  73.  * or if it is allocated in garbage-collectable space and never freed.
  74.  */
  75.  
  76. #define _param_array_struct(sname,etype)\
  77.   struct sname { const etype *data; uint size; bool persistent; }
  78. typedef _param_array_struct(gs_param_string_s, byte) gs_param_string;
  79. typedef _param_array_struct(gs_param_int_array_s, int) gs_param_int_array;
  80. typedef _param_array_struct(gs_param_float_array_s, float) gs_param_float_array;
  81. typedef _param_array_struct(gs_param_string_array_s, gs_param_string) gs_param_string_array;
  82.  
  83. #define param_string_from_string(ps, str)\
  84.   ((ps).data = (const byte *)(str),\
  85.    (ps).size = strlen((const char *)(ps).data),\
  86.    (ps).persistent = true)
  87.  
  88. /*
  89.  * Define the structure for heterogenous collection values (dictionaries
  90.  * and heterogenous arrays).
  91.  */
  92. typedef struct gs_param_collection_s {
  93.     gs_param_list *list;
  94.     uint size;
  95. } gs_param_collection;
  96. typedef gs_param_collection gs_param_dict;
  97. typedef gs_param_collection gs_param_array;
  98.  
  99. /*
  100.  * Define the sizes of the various parameter value types, indexed by type.
  101.  */
  102. #define GS_PARAM_TYPE_SIZES(dict_size)\
  103.   0, sizeof(bool), sizeof(int), sizeof(long), sizeof(float),\
  104.   sizeof(gs_param_string), sizeof(gs_param_string),\
  105.   sizeof(gs_param_int_array), sizeof(gs_param_float_array),\
  106.   sizeof(gs_param_string_array), sizeof(gs_param_string_array),\
  107.   (dict_size), (dict_size), (dict_size)
  108. /*
  109.  * Define the sizes of the underlying data types contained in or pointed
  110.  * to by the various value types.
  111.  */
  112. #define GS_PARAM_TYPE_BASE_SIZES(dict_elt_size)\
  113.   0, sizeof(bool), sizeof(int), sizeof(long), sizeof(float),\
  114.   1, 1, sizeof(int), sizeof(float),\
  115.   sizeof(gs_param_string), sizeof(gs_param_string),\
  116.   (dict_elt_size), (dict_elt_size), (dict_elt_size)
  117.  
  118. /* Define tables with 0 for the sizes of the heterogenous collections. */
  119. extern const byte gs_param_type_sizes[];
  120. extern const byte gs_param_type_base_sizes[];
  121.  
  122. /* Define a union capable of holding any parameter value. */
  123. #define GS_PARAM_VALUE_UNION(dict_type)\
  124.     bool b;\
  125.     int i;\
  126.     long l;\
  127.     float f;\
  128.     gs_param_string s;\
  129.     gs_param_string n;\
  130.     gs_param_int_array ia;\
  131.     gs_param_float_array fa;\
  132.     gs_param_string_array sa;\
  133.     gs_param_string_array na;\
  134.     dict_type d
  135. typedef union gs_param_value_s {
  136.     GS_PARAM_VALUE_UNION(gs_param_collection);
  137. } gs_param_value;
  138.  
  139. /*
  140.  * Define a structure containing a dynamically typed value (a value along
  141.  * with its type).
  142.  */
  143. typedef struct gs_param_typed_value_s {
  144.     gs_param_value value;
  145.     gs_param_type type;
  146. } gs_param_typed_value;
  147. /*
  148.  * Garbage collection of gs_param_values depends on the value type and on
  149.  * the 'd' member of the union.  We provide enum_ptrs and reloc_ptrs
  150.  * procedures that handle all the other cases -- i.e., cases other than
  151.  * heterogenous collections.
  152.  */
  153. struct_proc_enum_ptrs(gs_param_typed_value_enum_ptrs);
  154. struct_proc_reloc_ptrs(gs_param_typed_value_reloc_ptrs);
  155. #define gs_param_typed_value_max_ptrs 1
  156.  
  157. /*
  158.  * Define the representation alternatives for heterogenous collections.
  159.  * _any must be 0, for Boolean testing.
  160.  */
  161. typedef enum {
  162.  
  163.     /* Create or accept a general dictionary. */
  164.  
  165.     gs_param_collection_dict_any = 0,
  166.  
  167.     /* Create a dictionary with integer string keys ("0", "1", ...); */
  168.     /* accept a dictionary with integer string keys, or a heterogenous */
  169.     /* array. */
  170.  
  171.     gs_param_collection_dict_int_keys = 1,
  172.  
  173.     /* Create an array if possible, otherwise a dictionary with integer */
  174.     /* string keys; accept the same types as dict_int_keys. */
  175.  
  176.     gs_param_collection_array = 2
  177.  
  178. } gs_param_collection_type_t;
  179.  
  180. /*
  181.  * Define the 'policies' for handling out-of-range parameter values.
  182.  * This is not an enum, because some parameters may recognize other values.
  183.  */
  184. #define gs_param_policy_signal_error 0
  185. #define gs_param_policy_ignore 1
  186. #define gs_param_policy_consult_user 2
  187.  
  188. /*
  189.  * Define an enumerator used to iterate through the keys in a list.
  190.  *
  191.  * All the members of the union must be used such that memset(0) entire
  192.  * union means 'beginning of enumeration'.
  193.  */
  194. typedef union gs_param_enumerator_s {
  195.     int intval;
  196.     long longval;
  197.     void *pvoid;
  198.     char *pchar;
  199. } gs_param_enumerator_t;
  200. typedef gs_param_string gs_param_key_t;
  201.  
  202. /*
  203.  * Define the object procedures.  Note that the same interface is used
  204.  * both for getting and for setting parameter values.  (This is a bit
  205.  * of a hack, and we might change it someday.)  The procedures return
  206.  * as follows:
  207.  *      - 'reading' procedures ('put' operations from the client's viewpoint)
  208.  * return 1 for a missing parameter, 0 for a valid parameter, <0 on error.
  209.  *      - 'writing' procedures ('get' operations from the client's viewpoint)
  210.  * return 0 or 1 if successful, <0 on error.
  211.  *
  212.  * A lazy implementation can use the default procedures for scalar and
  213.  * homogenous collection types: these just called xmit_typed.
  214.  */
  215.  
  216. /*
  217.  * Transmitting variable-size objects requires some extra care.
  218.  *      - When writing an array, string, name, or dictionary, the
  219.  * implementation (not the client) sets all the fields of the value.
  220.  *      - When reading an array, string, or name, the client must set
  221.  * all the fields of the value.
  222.  *      - When reading a dictionary, the client must set the size field
  223.  * before calling begin_write_dict; the implementation of begin_write_dict
  224.  * allocates the list.
  225.  */
  226.  
  227. /*
  228.  * Setting parameters must use a "two-phase commit" policy.  Specifically,
  229.  * any put_params procedure must observe the following discipline:
  230.  
  231.  1. For each parameter known to the device, ask the parameter list if
  232.  there is a new value, and if so, make all necessary validity checks.  If any
  233.  check fails, call param_signal_error for that parameter, but continue to
  234.  check further parameters.  Normally, this step should not alter the state of
  235.  the device; however, if the device allows changing any parameters that are
  236.  read-only by default (for example, BitsPerPixel or ProcessColorModel), or if
  237.  it replaces the default put_params behavior for any parameter (for example,
  238.  if it handles MediaSize or Resolution itself to forestall the normal closing
  239.  of the device when these are set), step 1 of put_params must change the
  240.  parameters in the device state, and step 2 must undo the changes if
  241.  returning an error.
  242.  
  243.  2. Call the "superclass" put_params routine.  For printer devices,
  244.  this is gdev_prn_put_params; for other devices, it is gx_default_put_params.
  245.  Note that this must be done even if errors were detected in step 1.  If this
  246.  routine returns an error code, or if step 1 detected an error, undo any
  247.  changes that step 1 made in the device state, and return the error code.
  248.  
  249.  3. Install the new parameter values in the device.  If necessary,
  250.  close the device first; a higher-level routine (gs_putdeviceparams) will
  251.  reopen the device if necessary.
  252.  
  253.  */
  254.  
  255. typedef struct gs_param_list_procs_s {
  256.  
  257.     /* Transmit a typed value. */
  258.     /*
  259.      * Note that read/write_typed do a begin_read/write_collection
  260.      * if the type is one of the heterogenous collection types.
  261.      * Note also that even for reading, the caller must set pvalue->type
  262.      * to the desired type or to gs_param_type_any.
  263.      */
  264.  
  265. #define param_proc_xmit_typed(proc)\
  266.     int proc(P3(gs_param_list *, gs_param_name, gs_param_typed_value *))
  267.      param_proc_xmit_typed((*xmit_typed));
  268.      /* See below for param_read_[requested_]typed */
  269. #define param_write_typed(plist, pkey, pvalue)\
  270.      (*(plist)->procs->xmit_typed)(plist, pkey, pvalue)
  271.  
  272.      /* Start transmitting a dictionary or heterogenous value. */
  273.  
  274. #define param_proc_begin_xmit_collection(proc)\
  275.      int proc(P4(gs_param_list *, gs_param_name, gs_param_dict *,\
  276.              gs_param_collection_type_t))
  277.      param_proc_begin_xmit_collection((*begin_xmit_collection));
  278. #define param_begin_read_collection(plist, pkey, pvalue, coll_type)\
  279.      (*(plist)->procs->begin_xmit_collection)(plist, pkey, pvalue, coll_type)
  280. #define param_begin_read_dict(l, k, v, int_keys)\
  281.      param_begin_read_collection(l, k, v,\
  282.                      (int_keys ? gs_param_collection_dict_int_keys :\
  283.                       gs_param_collection_dict_any))
  284. #define param_begin_write_collection(plist, pkey, pvalue, coll_type)\
  285.      (*(plist)->procs->begin_xmit_collection)(plist, pkey, pvalue, coll_type)
  286. #define param_begin_write_dict(l, k, v, int_keys)\
  287.      param_begin_write_collection(l, k, v,\
  288.                       (int_keys ? gs_param_collection_dict_int_keys :\
  289.                        gs_param_collection_dict_any))
  290.  
  291.      /* Finish transmitting a collection value. */
  292.  
  293. #define param_proc_end_xmit_collection(proc)\
  294.      int proc(P3(gs_param_list *, gs_param_name, gs_param_dict *))
  295.      param_proc_end_xmit_collection((*end_xmit_collection));
  296. #define param_end_read_collection(plist, pkey, pvalue)\
  297.      (*(plist)->procs->end_xmit_collection)(plist, pkey, pvalue)
  298. #define param_end_read_dict(l, k, v) param_end_read_collection(l, k, v)
  299. #define param_end_write_collection(plist, pkey, pvalue)\
  300.      (*(plist)->procs->end_xmit_collection)(plist, pkey, pvalue)
  301. #define param_end_write_dict(l, k, v) param_end_write_collection(l, k, v)
  302.  
  303.      /* 
  304.       * Get the next key in sequence. 
  305.       * (Only used when reading.)
  306.       * Use param_init_enumerator(...) to reset to first key.
  307.       */
  308.  
  309. #define param_proc_next_key(proc)\
  310.      int proc(P3(gs_param_list *, gs_param_enumerator_t *, gs_param_key_t *))
  311.      param_proc_next_key((*next_key));
  312. #define param_get_next_key(plist, penum, pkey)\
  313.      (*(plist)->procs->next_key)(plist, penum, pkey)
  314.  
  315.      /*
  316.       * Request a specific parameter. (Only used when writing, before
  317.       * writing any values.)  If no specific parameters are requested,
  318.       * param_requested always returns -1; if specific parameters
  319.       * are requested, param_requested will return 1 for those,
  320.       * and may return either 0 or 1 for others.
  321.       */
  322.  
  323. #define param_proc_request(proc)\
  324.   int proc(P2(gs_param_list *, gs_param_name))
  325.      param_proc_request((*request));
  326.  
  327. #define param_request(plist, pkey)\
  328.   ((plist)->procs->request(plist, pkey))
  329.  
  330.      /*
  331.       * Determine whether a given key has been requested.  (Only used
  332.       * when writing.)  A return value of -1 means that no specific
  333.       * parameters have been requested; 0 means specific parameters have
  334.       * been requested, but not this one; 1 means this parameter has
  335.       * been requested specifically.
  336.       */
  337.  
  338. #define param_proc_requested(proc)\
  339.      int proc(P2(const gs_param_list *, gs_param_name))
  340.      param_proc_requested((*requested));
  341. #define param_requested(plist, pkey)\
  342.      (*(plist)->procs->requested)(plist, pkey)
  343.  
  344.      /* Get the 'policy' associated with an out-of-range parameter value. */
  345.      /* (Only used when reading.) */
  346.  
  347. #define param_proc_get_policy(proc)\
  348.      int proc(P2(gs_param_list *, gs_param_name))
  349.      param_proc_get_policy((*get_policy));
  350. #define param_get_policy(plist, pkey)\
  351.      (*(plist)->procs->get_policy)(plist, pkey)
  352.  
  353.      /*
  354.       * Signal an error.  (Only used when reading.)
  355.       * The procedure may return a different error code,
  356.       * or may return 0 indicating that the error is to be ignored.
  357.       */
  358.  
  359. #define param_proc_signal_error(proc)\
  360.      int proc(P3(gs_param_list *, gs_param_name, int))
  361.      param_proc_signal_error((*signal_error));
  362. #define param_signal_error(plist, pkey, code)\
  363.      (*(plist)->procs->signal_error)(plist, pkey, code)
  364. #define param_return_error(plist, pkey, code)\
  365.      return_error(param_signal_error(plist, pkey, code))
  366.  
  367.      /*
  368.       * "Commit" a set of changes.  (Only used when reading.)
  369.       * This is called at the end of the first phase.
  370.       */
  371.  
  372. #define param_proc_commit(proc)\
  373.      int proc(P1(gs_param_list *))
  374.      param_proc_commit((*commit));
  375. #define param_commit(plist)\
  376.      (*(plist)->procs->commit)(plist)
  377.  
  378. } gs_param_list_procs;
  379.  
  380. /* Transmit typed parameters. */
  381. int param_read_requested_typed(P3(gs_param_list *, gs_param_name,
  382.                   gs_param_typed_value *));
  383.  
  384. #define param_read_typed(plist, pkey, pvalue)\
  385.   ((pvalue)->type = gs_param_type_any,\
  386.    param_read_requested_typed(plist, pkey, pvalue))
  387.  
  388. /* Transmit parameters of specific types. */
  389. int param_read_null(P2(gs_param_list *, gs_param_name));
  390. int param_write_null(P2(gs_param_list *, gs_param_name));
  391. int param_read_bool(P3(gs_param_list *, gs_param_name, bool *));
  392. int param_write_bool(P3(gs_param_list *, gs_param_name, const bool *));
  393. int param_read_int(P3(gs_param_list *, gs_param_name, int *));
  394. int param_write_int(P3(gs_param_list *, gs_param_name, const int *));
  395. int param_read_long(P3(gs_param_list *, gs_param_name, long *));
  396. int param_write_long(P3(gs_param_list *, gs_param_name, const long *));
  397. int param_read_float(P3(gs_param_list *, gs_param_name, float *));
  398. int param_write_float(P3(gs_param_list *, gs_param_name, const float *));
  399. int param_read_string(P3(gs_param_list *, gs_param_name, gs_param_string *));
  400. int param_write_string(P3(gs_param_list *, gs_param_name,
  401.               const gs_param_string *));
  402. int param_read_name(P3(gs_param_list *, gs_param_name, gs_param_string *));
  403. int param_write_name(P3(gs_param_list *, gs_param_name,
  404.             const gs_param_string *));
  405. int param_read_int_array(P3(gs_param_list *, gs_param_name,
  406.                 gs_param_int_array *));
  407. int param_write_int_array(P3(gs_param_list *, gs_param_name,
  408.                  const gs_param_int_array *));
  409. int param_write_int_values(P5(gs_param_list *, gs_param_name,
  410.                   const int *, uint, bool));
  411. int param_read_float_array(P3(gs_param_list *, gs_param_name,
  412.                   gs_param_float_array *));
  413. int param_write_float_array(P3(gs_param_list *, gs_param_name,
  414.                    const gs_param_float_array *));
  415. int param_write_float_values(P5(gs_param_list *, gs_param_name,
  416.                 const float *, uint, bool));
  417. int param_read_string_array(P3(gs_param_list *, gs_param_name,
  418.                    gs_param_string_array *));
  419. int param_write_string_array(P3(gs_param_list *, gs_param_name,
  420.                 const gs_param_string_array *));
  421. int param_read_name_array(P3(gs_param_list *, gs_param_name,
  422.                  gs_param_string_array *));
  423. int param_write_name_array(P3(gs_param_list *, gs_param_name,
  424.                   const gs_param_string_array *));
  425.  
  426. /*
  427.  * Define an abstract parameter list.  Implementations are concrete
  428.  * subclasses.
  429.  *
  430.  * The persisent_keys flag allows for both statically and dynamically
  431.  * allocated keys.  The default is static (the keys are normally C string
  432.  * literals).
  433.  */
  434. #define gs_param_list_common\
  435.     const gs_param_list_procs *procs;\
  436.     gs_memory_t *memory;    /* for allocating coerced arrays */\
  437.     bool persistent_keys
  438. struct gs_param_list_s {
  439.     gs_param_list_common;
  440. };
  441.  
  442. /* Set whether the keys for param_write_XXX are persistent. */
  443. /* VMS limits procedure names to 31 characters. */
  444. #define gs_param_list_set_persistent_keys gs_param_list_set_persist_keys
  445. void gs_param_list_set_persistent_keys(P2(gs_param_list *, bool));
  446.  
  447. /* Initialize a parameter list key enumerator. */
  448. void param_init_enumerator(P1(gs_param_enumerator_t * penum));
  449.  
  450. /*
  451.  * The following interface provides a convenient way to read and set
  452.  * collections of parameters of any type other than dictionaries.
  453.  */
  454.  
  455. typedef struct gs_param_item_s {
  456.     const char *key;
  457.     byte /*gs_param_type */ type;
  458.     short offset;        /* offset of value in structure */
  459. } gs_param_item_t;
  460. #define gs_param_item_end { 0 }    /* list terminator */
  461. /*
  462.  * Transfer a collection of parameters.
  463.  * For param_write_items, if a parameter value is equal to the value in
  464.  * the optional default_obj, the item isn't transferred.
  465.  */
  466. int gs_param_read_items(P3(gs_param_list * plist, void *obj,
  467.                const gs_param_item_t * items));
  468. int gs_param_write_items(P4(gs_param_list * plist, const void *obj,
  469.                 const void *default_obj,
  470.                 const gs_param_item_t * items));
  471.  
  472. /* Internal procedure to initialize the common part of a parameter list. */
  473. void gs_param_list_init(P3(gs_param_list *, const gs_param_list_procs *,
  474.                gs_memory_t *));
  475.  
  476. /*
  477.  * Internal procedure to read a value, with coercion if requested, needed,
  478.  * and possible.  If mem != 0, we can coerce int arrays to float arrays, and
  479.  * possibly do other coercions later.
  480.  */
  481. int param_coerce_typed(P3(gs_param_typed_value * pvalue,
  482.               gs_param_type req_type, gs_memory_t * mem));
  483.  
  484. /* ---------------- Default implementation ---------------- */
  485.  
  486. /*
  487.  * Provide default generic implementations of param_request and
  488.  * param_requested.
  489.  */
  490. param_proc_request(gs_param_request_default);  /* does nothing */
  491. param_proc_requested(gs_param_requested_default);  /* always returns true */
  492.  
  493. /*
  494.  * Define a default implementation, intended to be usable easily
  495.  * from C code.  The intended usage pattern is:
  496.     gs_c_param_list list;
  497.     [... other code here ...]
  498.     gs_c_param_list_write(&list, mem);
  499.     [As many as needed:]
  500.     code = param_write_XXX(&list, "ParamName", ¶m_value);
  501.     [Check code for <0]
  502.     gs_c_param_list_read(&list);
  503.     code = gs_putdeviceparams(dev, &list);
  504.     gs_c_param_list_release(&list);
  505.     [Check code for <0]
  506.     if ( code == 1 )
  507.     {
  508.         code = (*dev_proc(dev, open_device))(dev);
  509.         [Check code for <0]
  510.     }
  511.  *
  512.  * This implementation also has the special property that it can forward
  513.  * unrecognized param_read_ calls to another parameter list, called the
  514.  * target.  This allows constructing incrementally modified parameter lists.
  515.  * Note that this is only relevant for put_params (reading from the
  516.  * parameter list).
  517.  */
  518.  
  519. typedef struct gs_c_param_s gs_c_param;    /* opaque here */
  520. typedef struct gs_c_param_list_s {
  521.     gs_param_list_common;
  522.     gs_c_param *head;
  523.     gs_param_list *target;
  524.     uint count;
  525.     bool any_requested;
  526.     gs_param_collection_type_t coll_type;
  527. } gs_c_param_list;
  528. #define private_st_c_param_list()    /* in gsparam.c */\
  529.   gs_private_st_ptrs2(st_c_param_list, gs_c_param_list, "c_param_list",\
  530.     c_param_list_enum_ptrs, c_param_list_reloc_ptrs, head, target)
  531.  
  532. /* Set the target of a C parameter list. */
  533. void gs_c_param_list_set_target(P2(gs_c_param_list *, gs_param_list *));
  534.  
  535. /*
  536.  * Clients normally allocate the gs_c_param_list on the stack, but we
  537.  * provide a procedure for allocating one in memory.
  538.  */
  539. gs_c_param_list *gs_c_param_list_alloc(P2(gs_memory_t *, client_name_t));
  540. void gs_c_param_list_write(P2(gs_c_param_list *, gs_memory_t *));
  541. void gs_c_param_list_write_more(P1(gs_c_param_list *)); /* switch back to writing, no init */
  542. void gs_c_param_list_read(P1(gs_c_param_list *));    /* switch to reading */
  543. void gs_c_param_list_release(P1(gs_c_param_list *));
  544.  
  545. #endif /* gsparam_INCLUDED */
  546.